//
//  BankCell.m
//  DianDangDai
//
//  Created by bhf on 2017/12/21.
//  Copyright © 2017年 bhf. All rights reserved.
//

#import "BankCell.h"

@implementation BankCell

- (void)awakeFromNib {
    [super awakeFromNib];
    _bgView.layer.cornerRadius = 5;
//    int R = (arc4random() % 256) ;
//    int G = (arc4random() % 256) ;
//    int B = (arc4random() % 256) ;
    //_bgView.backgroundColor = [UIColor colorWithHex:@"#"]
    //[UIColor colorWithRed:R/255.0 green:G/255.0 blue:B/255.0 alpha:1];
    // Initialization code
}

- (void)setModel:(BankCardModel *)model {
    _model = model;
    [_logo sd_setImageWithURL:[NSURL URLWithString:model.userBank] completed:^(UIImage * _Nullable image, NSError * _Nullable error, SDImageCacheType cacheType, NSURL * _Nullable imageURL) {
        NSLog(@"%@",error);
    }];
    _name.text = model.bankName;
    _type.text = model.type;
    _number.text = model.CardId;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
